home *** CD-ROM | disk | FTP | other *** search
- Path: daily-planet.execpc.com!usenet
- From: innuendo@execpc.com (Jonathan Gapen)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Shared library open and close functions
- Date: 18 Feb 1996 02:23:47 GMT
- Organization: esCom Amiga Madison Enthusiast's Organisation
- Message-ID: <4g62jj$91t@daily-planet.execpc.com>
- References: <510.6619T1238T1638@Th0r.foo.bar> <935.6621T819T991@norconnect.no>
- NNTP-Posting-Host: specialk.execpc.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=iso-8859-1
- Content-Transfer-Encoding: 8bit
- X-NewsSoftware: GRn 2.1 Feb 19, 1994
-
-
- In article <935.6621T819T991@norconnect.no> kenneth@norconnect.no (Kenneth C. Nilsen) writes:
- > The 15-Feb-96 20:40:20, Christopher Naas wrote in msg n/a :
- >
- > >How do I add functions to a shared library that are called the first time the
- > >library is opened and when the library is removed from memory?
- > >I want one function that is called the first time the library is opened, and
- > >one function that is called when the library is closed by the last user and
- > >it is flushed from memory.
- >
- > 1) You have to make the library yourself cause OpenLibrary() calls a init
- > when a library is opened for the first time and this can't be added
- > inbetween. You can not use exec.library functions for this purpose.
- >
- > 2) You have to patch the OpenLibrary()/CloseLibrary() vector to call routines
- > when your library is opened/closed, tho I will not recommend this.
-
- 3) Read the SAS/C documentation on shared libraries, to find out how to add
- custom functions to the supplied library init code. This is my recommended
- method.
-
- --
- Jonathan Gapen (innuendo@execpc.com)
- Bread in, toast out. How does it DO that?
-